<?php
    $parrent_category = $this->parrent_category;
    
?>
<style type="text/css">
    body{color: #000000}
    #Text2
    {
        width: 70%;
        height: 32px;
    }
    #Button1
    {
        height: 25px;
        width: 82px;
        margin-top: 0px;
    }
    #quest_title
    {
        width: 100%;
    }
    #quest_content
    {
        width: 100%;
        height: 84px;
    }
    #Button2
    {
        height: 37px;
        width: 149px;
    }
    </style>
    <script>
        var temp;
        function showTable(a) {
            document.getElementById(a).style.display = "";


        }
        function hideTable(a) {
            document.getElementById(a).style.display = "none";
            //document.getElementById(a).setAttribute("size", 0);
        }
        function Button1_onclick() {

        }
        function add_question(){
            document.add_quest.submit();
        }
        function show_similar_quest(){
                var url =  'admin_ajax/question/load';
                $.post(url, '', function(data){
                        if(data.match("<success>")){
                                document.location.reload();
                        }else{
                                alert(data);
                        }
                });
        }
    </script>
    <script type="text/javascript">
    $(document).ready(function(){
        hideTable("user_list");
    });
    </script>
</head>
<form name="add_quest" action="saveadd/" method="post">
<tr>
	<td style="width:70%">
		<table style="width:100%;">
			<tr>
				<td>
		<table style="width:100%;" bgcolor="LightGray" frame="border">
			<tr>
                            <td colspan="2"><strong>Tiêu đề</strong> <input id="quest_title" name="quest_title" type="text" onKeyDown="showTable('similar_question')" /></td>
                        </tr>
			<tr>
                             <td colspan="2"><strong>Nội dung </strong>
                                <textarea id="quest_content" name="quest_content" rows="3" onKeyDown="showTable('similar_question')" cols="100"></textarea>
                            </td>
                        </tr>
			<tr>
                            <td>
                                <input id="cate_1" name="cate_parrent" type="radio" checked="true"/><label for="cate_1">Lớp 9 </label>
                                <input id="cate_2" name="cate_parrent" type="radio" /><label for="cate_2">Lớp 10 </label>
                                <input id="cate_3" name="cate_parrent" type="radio" /><label for="cate_3">Lớp 11 </label>
                                <input id="cate_4" name="cate_parrent" type="radio" /> <label for="cate_4">Lớp 12 </label>
                                <input id="cate_5" name="cate_parrent" type="radio" /><label for="cate_5">LTDH </label>
                                <? foreach($parrent_category as $p) {?>
                                <input id="cate_1" name="cate_parrent" type="radio" checked="true"/><label for="cate_1">Lớp 9 </label>
                                <? } ?>
                                <select name="cate_child" id="cate_child">
                                
                                </select>
                                    <a href ="#">Trở lại</a></td>
                            <td align="right">
                                    <input id="ask_type1" name="ask_type" type="radio" value="ask_type1"
                                            onclick="hideTable('specialist_list'); showTable('user_list');"
                                            /><label for="ask_type1">Người dùng</label>
                                    <input id="ask_type2" name="ask_type" type="radio" value="ask_type2" checked="true" onclick="hideTable('user_list'); showTable('specialist_list');" />
                                    <label for="ask_type2">Cộng tác viên</label>
                             </td>
                        </tr>
			<tr>
                            <td>
                                    <table id="specialist_list">
                                            <tr>
                                                    <td style="width:120" valign="bottom">
                                    <img alt="Image1" src="" title="" style="height: 50px; width: 50px" /><br />
                                                            <input id="Radio18" name="specialist" type="radio" value="V1" checked="true" />Tat ca</td>
                                                    <td style="width:150" valign="bottom">
                                    <img alt="Image1" src="specialist_icon.jpg" title="" style="height: 50px; width: 50px" />
                                    <br />
                                                            <input id="Radio1" name="specialist" type="radio" value="V1"/>CG Nguyễn Văn A</td>
                                                    <td style="width:150" valign="bottom">
                                    <img alt="Image2" src="specialist_icon.jpg" height="100" width="100" title=""
                                            style="height: 50px; width: 50px" /><br />
                                                            <input id="Radio11" name="specialist" type="radio" value="V1"/>CG Trần Văn B</td>
                                                    <td style="width:120" valign="bottom">
                                    <img alt="" src="specialist_icon.jpg" height="100" width="100" title=""
                                            style="height: 50px; width: 50px" /><br />
                                                            <input id="Radio12" name="specialist" type="radio" value="V1" />CG Lý Thị C</td>
                                                    <td style="width:120" valign="bottom">
                                    <img alt="" src="specialist_icon.jpg" height="100" width="100" title=""
                                            style="height: 50px; width: 50px" /><br />
                                                            <input id="Radio13" name="specialist" type="radio" value="V1" /> CG Lê Thị D</td>
                                            </tr>
                                    </table>
                                    <table id="user_list">
                                            <tr>
                                                    <td style="width:120">
                                    <img alt="Image1" src="" title="" style="height: 50px; width: 50px" /><br />
                                                            <input id="user" name="user" type="radio" value="V1" checked="true" />Tat ca</td>
                                                    <td style="width:120">
                                    <img alt="Image1" src="user_icon.jpg" title="" style="height: 50px; width: 50px" />
                                    <br />
                                                            <input id="Radio2" name="user" type="radio" value="1"/>user 1</td>
                                                    <td style="width:120">
                                    <img alt="Image2" src="user_icon.jpg" height="100" width="100" title=""
                                            style="height: 50px; width: 50px" /><br />
                                                            <input id="Radio3" name="user" type="radio" value="2"/>user 2</td>
                                                    <td style="width:120">
                                    <img alt="" src="user_icon.jpg" height="100" width="100" title=""
                                            style="height: 50px; width: 50px" /><br />
                                                            <input id="Radio4" name="user" type="radio" value="3" />user 3</td>
                                                    <td style="width:120">
                                    <img alt="" src="user_icon.jpg" height="100" width="100" title=""
                                            style="height: 50px; width: 50px" /><br />
                                                            <input id="Radio5" name="user" type="radio" value="4" /> user 4</td>
                                            </tr>
                                    </table>
                            </td>
                            <td align="right" valign="bottom">
                                    <br />
                                    2000 C<br />
                                    <a href="QuestionViewBegining.htm">Xem trước</a>&nbsp;&nbsp; <input onclick="add_question()" type="button" value="Đặt câu hỏi" />
                            </td>
                        </tr>
		</table>
              </td>
            </tr>
			<tr>
				<td>
					<table id="similar_question" style="width:100%" frame="border">
						<tr>
							<td bgcolor="Silver">
								<strong>Câu hỏi tương tự</strong></td>
						</tr>
						<tr>
							<td>
								<table style="width:100%;">
									<tr>
										<td>
											<a href="Homepage.htm">
											Tập luyện phát triển sức mạnh có những nguyên tắc và yêu cầu nào ?</a>
											[Toán 9]</td>
										<td>

											Nguyễn Việt A</td>
										<td>
											50</td>
										<td>
											02/09/2011</td>
									</tr>									
									<tr>
										<td>&nbsp;
											</td>
										<td>&nbsp;
											</td>
										<td>&nbsp;
											</td>
										<td>
											<a href="">Tìm kiếm</a></td>
									</tr>
									</table>
							</td>
						</tr>
					</table>
							</td>
			</tr>
			<tr>
				<td>&nbsp;
					</td>
			</tr>
			<tr>
				<td>&nbsp;
					</td>
			</tr>
		</table>
	</td>
	<td>&nbsp;
		</td>
</tr>
</form>